﻿using System;
using System.Collections.Generic;

using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using Gift.DAL;
using Gift.Model;

namespace WebSite.admin.order
{
    public partial class orderGoodsCountEdit : System.Web.UI.Page
    {

        readonly DALtbTempCar theCar = new DALtbTempCar();
        tbTempCar oCar;

        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void btnSaveRefresh_Click(object sender, EventArgs e)
        {
           
            oCar = new tbTempCar();
            oCar.OrderCode = long.Parse( Request.QueryString["code"]);
            oCar.GoodsId = int.Parse( Request.QueryString["id"]);
            oCar.goodsCount = int.Parse(this.txtGoodsCount.Text.Trim());
            oCar.UpdateDate = DateTime.Now;
            oCar.GoodsPoints = int.Parse(Request.QueryString["points"]);
            oCar.ModelTypeId = int.Parse(Request.QueryString["mid"]);
          
            theCar.Update(oCar);

 
            ExtAspNet.PageContext.RegisterStartupScript(ExtAspNet.ActiveWindow.GetHidePostBackReference());
        }
    }
}